//
//  QTUserDefault.m
//  qdqts
//
//  Created by jonn on 14-6-21.
//  Copyright (c) 2014年 seas.cheng. All rights reserved.
//

#import "QTUserDefault.h"

@implementation QTUserDefault

+(QTUserDefault *)sharedInstance
{
    static QTUserDefault *sharedManager;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedManager = [[QTUserDefault alloc] init];
    });
    return sharedManager;
}

-(void)saveNSUserDefaults:(NSString *)value forKey:(NSString *)forKey
{
    NSUserDefaults *userDefaults=[NSUserDefaults standardUserDefaults];
    [userDefaults setObject:value forKey:forKey];
    [userDefaults synchronize];
}

-(NSString *)readNSUserDefaults:(NSString *)forKey
{
    NSUserDefaults *userDefaults=[NSUserDefaults standardUserDefaults];
    return [userDefaults stringForKey:forKey];
}

@end
